home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 3
/
Light ROM 3 - Disc 2.iso
/
programs
/
amiga
/
dps
/
par252.lha
/
rexx
/
ROTO.ddr
< prev
next >
Wrap
Text File
|
2003-03-22
|
3KB
|
127 lines
/* Lightwave/Personal Animation Recorder Rotoscoping Script */
/* version 0.1 10/28/93 by David White */
/* copywrite 1993 Digital Processing Systems */
/* ++++++++++++ THIS IS THE USER SETTINGS AREA +++++++++++++++++++++++++ */
sourceName='ddr:Anims/Warp' /* source/dest names for rotoscope */
destName ='ddr:Anims/roto' /* device, project and name must be used */
/* For LightWave, select "Load Sequence" in Images and use "ram:temp." */
StartFrame= 1
EndFrame = 30
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
options failat 20
options results
/* ------------------ open the libraries -------------------------- */
if ~show('L','rexxsupport.library') then
if ~addlib('rexxsupport.library',0,-30,0) then do
SAY 'ERROR: rexxsupport.library not available.'
exit 10
end
if ~show('L','rexxarplib.library') then
if ~addlib('rexxarplib.library',0,-30,0) then do
SAY 'ERROR: rexxarplib.library not available.'
exit 10
end
/* ------------------- Are all the programs here ? ----------------*/
if ~show('P','LightWaveARexx.port') then do
SAY 'Lightwave not up and running!'
SAY 'Please load and try again.'
exit
end
if ~show('P','DDR') then do
SAY 'Personal Animation Recorder not up and running!'
SAY 'Please load and try again.'
exit
end
/* ---------- initial parsing and setup ----------- */
parse var sourceName sDev':'sProj'/'sName
parse var destName dDev':'dProj'/'dName
sUnit=Right(sDev,1)
dUnit=Right(dDev,1)
Address DDR
MODE ANIM /* make sure that the PAR is in anim mode */
EMODE 1 /* export field 1 */
PATH 'RAM:' /* set the output path */
Address 'LightWaveARexx.port'
'SaveImages' destName'.'
'AsyncMode off' /* make sure that lightwave doesn't run off */
address command "c:delete >nil: ram:temp#?"
/*------------- Start of main loop -------------------*/
do frame_num = StartFrame to EndFrame
/* ------------- setup names -------------*/
name3='temp.'Right(frame_num,3,0) /* 3 digit */
name4=sName'.F1.'Right(frame_num,4,0) /* 4 digit */
/* --------- export current frame of source -------- */
address DDR
UNIT sUnit /* select drive */
PROJECT sProj /* select project */
if result='' then do;say 'Bad source project';exit;end
FILE sName /* select file to rotoscope out of */
if result='' then do;say 'Bad source name' ;exit;end
Say 'Exporting frame' frame_num
EXPORT frame_num /* export it */
call Rename('ram:'name4,'ram:'name3) /* rename 4 digit ext. to 3 */
/* ------- Enable append on dest if exists --------- */
UNIT dUnit
PROJECT dProj
if result='' then do;say 'Bad dest project';exit;end
FILE dName'.'
if result~='' then APPEND ON
/* ---------------- Render a frame ----------------- */
address 'LightWaveARexx.port'
'FirstFrame' frame_num
'LastFrame' frame_num
Say 'Rendering frame' frame_num
'RENDER 1'
Say 'done.'
/* --- Delete RAM temp file, and close anim. --- */
call Delete('ram:'name3)
address DDR DONE
end
Address DDR APPEND OFF /* If we get this far, be safe and disable append */
Say 'Rotoscoping complete.'
Say 'Thank you for using ROTO.'